<?php
class RateConfig_3d
{

    public $disk_type = array
        (
        "a" => "a",
        "b" => "b",
        "c" => "c",
        "d" => "d"
    );
    public $disk_idx = array
        (
        "a" => 1,
        "b" => 2,
        "c" => 3,
        "d" => 4
    );
    public $show_5number_3d = false;
    public $splitArr = array
        (
        0 => "全部",
        1 => "成数"
    );
    public $diskArr = array
        (
        0 => "全部",
        1 => "a",
        2 => "b",
        3 => "c",
        4 => "d"
    );
    public $orderArr = array
        (
        0 => "",
        1 => "amount",
        2 => "number"
    );
    public $ratemodArr = array
        (
        0 => "目前赔率",
        1 => "平均赔率",
        2 => "输赢赔率"
    );
    public $playtypeArr = array();
    public $playtypeArr02 = array();
    public $playGroupArr = array();
    public $playGroupArr02 = array();
    public $subArr = array
        (
        2 => "前三",
        1 => "中三",
        0 => "後三"
    );
    public $showAllSubArr = array();
    public $showAllSubArr02 = array();
    public $tbl = NULL;
    public $gametype = 1;

    public function RateConfig_3d ($gametype = 1)
    {
        global $g_gametype_3d;
        global $g_5number_3d;
        global $g_n5GameArr;
        $this->tbl = $g_gametype_3d[$gametype]['en'];
        $this->gametype = $gametype;
        if (getShow35($gametype))
        {
            $this->show_5number_3d = true;
            $this->setPlaytypeArr_5n();
        }
        else
        {
            $this->setPlaytypeArr();
        }
    }

    public function setPlaytypeArr_5n ()
    {
		//$this->playtypeArr = array("r1" => "主盘势", "r2f" => "双面盘口", "r1p" => "一字盘势", "r2" => "二字组合", "r3" => "三字组合", "g3" => "组选三", "g6" => "组选六", "r1bs" => "跨度", "r1lt" => "总和龙虎", "nnsh" => "牛牛梭哈");
        $this->playtypeArr = array("r1" => "两面/龙虎", "r2" => "号码定位盘", "r3" => "一字/前中后", "r4" => "牛牛/梭哈");
		$this->playGroupArr = array(
            //"r1" => array("55", "0", "56", "57", "58", "59", "60", "61", "4", "7", "10", "5", "8", "11", "6", "9", "12"),
			"r1" => array("55", "56", "57", "58", "59", "60", "61", "4", "7", "10", "5", "8", "11", "6", "9", "12","71","72","73"),
            "r2" => array("1","2","3","69","70"),
			"r3" => array("55","0","76"),
			"r4" => array("74","75")
			//"r2f" => array("62", "63", "64", "65", "66", "67", "68", "17", "18", "19"),
            //"r1p" => array("69", "70", "1", "2", "3", "0", "55", "56", "57", "58", "59", "60", "61", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"),
            //"r2" => array("13"),
            //"r3" => array("20"),
            //"g3" => array("24", "25", "26", "27", "28", "29"),
            //"g6" => array("30", "31", "32", "33", "34"),
            //"r1bs" => array("47"),
            //"r1lt" => array("71", "72", "73"),
			//"nnsh"=>array("74","75")
        );
		//后台赔率设定的菜单
        $this->playtypeArr02 = array("r1" => "两面/龙虎","r1p" => "号码定位盘", "r2" => "其它","nn"=>"牛牛","sh"=>"梭哈");
        $this->playGroupArr02 = array(
            "r1" => array("55", "0", "56", "57", "58", "59", "60", "61", "4", "7", "10", "5", "8", "11", "6", "9", "12", "71", "72", "73"),
            "r1p" => array("69", "70", "1", "2", "3"),
            "r2" => array("76"),
			"nn"=>array("74"),
			"sh"=>array("75")
        );
        $this->showAllSubArr = array();
        $this->showAllSubArr02 = array();
    }

    public function setPlaytypeArr ()
    {
        //$this->playtypeArr = array("r1" => "主盘势", "r1p" => "一字盘势", "r2p" => "二字定位", "r2" => "二字组合", "r2a" => "二字和数", "r3p" => "三字定位", "r3" => "三字组合", "r3a" => "三字和数", "g3" => "组选三", "g6" => "组选六", "rcmp" => "复式组合", "r1pass" => "一字过关", "r1bs" => "跨度", "r1o" => "其他");
        $this->playtypeArr = array("r1" => "两面/龙虎", "r2" => "号码定位盘", "r3" => "一字/前中后", "r4" => "牛牛/梭哈");
        $this->playGroupArr = array(
			"r1" => array("55", "56", "57", "58", "59", "60", "61", "4", "7", "10", "5", "8", "11", "6", "9", "12","71","72","73"),
            "r2" => array("1","2","3","69","70"),
			"r3" => array("55","0","76"),
			"r4" => array("74","75")
        );
        $this->playtypeArr02 = array("r1" => "主盘势", "r1p" => "一字盘势", "r2p" => "二字定位", "r2" => "二字组合", "r2a" => "二字和数", "r3p" => "三字定位", "r3" => "三字组合", "r3a" => "三字和数", "g3" => "组选三", "g6" => "组选六", "rcmp" => "复式组合", "r1pass" => "一字过关", "r1bs" => "跨度", "r1o" => "其他");
        $this->playGroupArr02 = array(
            "r1" => array("0", "4", "5", "6", "7", "8", "9", "10", "11", "12", "17", "18", "19", "22", "23", "44", "45"),
            "r1p" => array("1", "2", "3"),
            "r2p" => array("14", "15", "16"),
            "r2" => array("13"),
            "r2a" => array("36", "37", "38", "39", "40", "41"),
            "r3p" => array("21"),
            "r3" => array("20"),
            "r3a" => array("42", "43"),
            "g3" => array("24", "25", "26", "27", "28", "29"),
            "g6" => array("30", "31", "32", "33", "34"),
            "rcmp" => array("35"),
            "r1pass" => array("46"),
            "r1bs" => array("47"),
            "r1o" => array("48", "49", "50", "51", "52", "53", "54")
        );
        if (9 < $this->gametype)
        {
            unset($this->playtypeArr['r1pass']);
            unset($this->playtypeArr02['r1pass']);
            unset($this->playGroupArr['r1pass']);
            unset($this->playGroupArr02['r1pass']);
            unset($this->playtypeArr['r3p']);
            unset($this->playtypeArr02['r3p']);
            unset($this->playGroupArr['r3p']);
            unset($this->playGroupArr02['r3p']);
        }
    }

    public function getLittlePageArr ($showType = 0)
    {
        switch ($showType)
        {
            case 0 :
                return array(0, 55);
            case 1 :
                return array(3, 6, 9, 12);
            case 2 :
                return array(2, 5, 8, 11);
            case 3 :
                return array(1, 4, 7, 10);
            case 4 :
                return array(70, 59, 60, 61);
            case 5 :
                return array(69, 56, 57, 58);
            default :
                return array();
        }
    }

    public function chkG3G6Idx ($bettype)
    {
        $reVal = false;
        $chkArr = array("24", "25", "26", "27", "28", "30", "31", "32", "33", "34");
        if (in_array($bettype, $chkArr))
        {
            $reVal = $bettype < 29 ? $bettype - 19 : $bettype - 26;
        }
        return $reVal;
    }

    public function chkRcmpNum ($numArr)
    {
        $reVal = false;
        $chkArr = array("0" => "0", "1" => "1", "2" => "2", "3" => "3", "4" => "4", "5" => "5", "6" => "6", "7" => "7", "8" => "8", "9" => "9");
        foreach ($numArr as $num)
        {
            if (!isset($chkArr[$num]))
            {
                $reVal = $num;
                break;
            }
        }
        return $reVal;
    }

    public function chkMixIdx ($bettype, $numArr)
    {
        $reVal = true;
        switch ($bettype)
        {
            case 46 :
                if (count($numArr) != 3)
                {
                    $reVal = false;
                    break;
                }
                if ($numArr[0] < 0 || 5 < $numArr[0])
                {
                    $reVal = false;
                    break;
                }
                if ($numArr[1] < 6 || 11 < $numArr[1])
                {
                    $reVal = false;
                    break;
                }
                if ($numArr[2] < 12 || 17 < $numArr[2])
                {
                    $reVal = false;
                    break;
                }
                break;
        }
        return $reVal;
    }

    public function checkDiskType ($disk_type)
    {
        return isset($this->disk_type[$disk_type]);
    }

    public function getBetTypeNumber ($bettype, $pFlag = false, $ptype = 0, $pnum = 0)
    {
        $returnArr = "";
        switch ($bettype)
        {
            case 0 :
            case 1 :
            case 2 :
            case 3 :
            case 24 :
            case 25 :
            case 26 :
            case 27 :
            case 28 :
            case 30 :
            case 31 :
            case 32 :
            case 33 :
            case 34 :
            case 39 :
            case 40 :
            case 41 :
            case 43 :
            case 47 :
            case 53 :
            case 54 :
            case 55 :
            case 69 :
            case 70 :
                $returnArr = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
                break;
            case 4 :
            case 5 :
            case 6 :
            case 7 :
            case 8 :
            case 9 :
            case 10 :
            case 11 :
            case 12 :
            case 17 :
            case 18 :
            case 19 :
            case 22 :
            case 23 :
            case 44 :
            case 45 :
            case 56 :
            case 57 :
            case 58 :
            case 59 :
            case 60 :
            case 61 :
            case 62 :
            case 63 :
            case 64 :
            case 65 :
            case 66 :
            case 67 :
            case 68 :
            case 71 :
            case 72 :
                $returnArr = array("1", "2");
                break;
            case 73 :
                $returnArr = array("1", "2", "3");
                break;
            case 13 :
                $returnArr = array("00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "11", "12", "13", "14", "15", "16", "17", "18", "19", "22", "23", "24", "25", "26", "27", "28", "29", "33", "34", "35", "36", "37", "38", "39", "44", "45", "46", "47", "48", "49", "55", "56", "57", "58", "59", "66", "67", "68", "69", "77", "78", "79", "88", "89", "99");
                break;
            case 14 :
            case 15 :
            case 16 :
                $returnArr = array("00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99");
                break;
            case 20 :
                $returnArrTemp = array("000", "001", "002", "003", "004", "005", "006", "007", "008", "009", "011", "012", "013", "014", "015", "016", "017", "018", "019", "022", "023", "024", "025", "026", "027", "028", "029", "033", "034", "035", "036", "037", "038", "039", "044", "045", "046", "047", "048", "049", "055", "056", "057", "058", "059", "066", "067", "068", "069", "077", "078", "079", "088", "089", "099", "111", "112", "113", "114", "115", "116", "117", "118", "119", "122", "123", "124", "125", "126", "127", "128", "129", "133", "134", "135", "136", "137", "138", "139", "144", "145", "146", "147", "148", "149", "155", "156", "157", "158", "159", "166", "167", "168", "169", "177", "178", "179", "188", "189", "199", "222", "223", "224", "225", "226", "227", "228", "229", "233", "234", "235", "236", "237", "238", "239", "244", "245", "246", "247", "248", "249", "255", "256", "257", "258", "259", "266", "267", "268", "269", "277", "278", "279", "288", "289", "299", "333", "334", "335", "336", "337", "338", "339", "344", "345", "346", "347", "348", "349", "355", "356", "357", "358", "359", "366", "367", "368", "369", "377", "378", "379", "388", "389", "399", "444", "445", "446", "447", "448", "449", "455", "456", "457", "458", "459", "466", "467", "468", "469", "477", "478", "479", "488", "489", "499", "555", "556", "557", "558", "559", "566", "567", "568", "569", "577", "578", "579", "588", "589", "599", "666", "667", "668", "669", "677", "678", "679", "688", "689", "699", "777", "778", "779", "788", "789", "799", "888", "889", "899", "999");
                if ($pFlag)
                {
                    $returnArr = array_slice($returnArrTemp, $ptype, $pnum);
                }
                else
                {
                    $returnArr = $returnArrTemp;
                }
                break;
            case 21 :
            case 35 :
                if ($pFlag)
                {
                    $reArrTemp = array(0 => array(), 1 => array(), 2 => array());
                    $i = 0;
                    while ($i < 10)
                    {
                        $j = 0;
                        while ($j < 10)
                        {
                            $reArrTemp[0][] = "" . $pnum . $i . $j;
                            $reArrTemp[1][] = "" . $i . $pnum . $j;
                            $reArrTemp[2][] = "" . $i . $j . $pnum;
                            ++$j;
                        }
                        ++$i;
                    }
                    $returnArr = $reArrTemp[$ptype];
                }
                else
                {
                    $returnArr = array("000", "001", "002", "003", "004", "005", "006", "007", "008", "009", "010", "011", "012", "013", "014", "015", "016", "017", "018", "019", "020", "021", "022", "023", "024", "025", "026", "027", "028", "029", "030", "031", "032", "033", "034", "035", "036", "037", "038", "039", "040", "041", "042", "043", "044", "045", "046", "047", "048", "049", "050", "051", "052", "053", "054", "055", "056", "057", "058", "059", "060", "061", "062", "063", "064", "065", "066", "067", "068", "069", "070", "071", "072", "073", "074", "075", "076", "077", "078", "079", "080", "081", "082", "083", "084", "085", "086", "087", "088", "089", "090", "091", "092", "093", "094", "095", "096", "097", "098", "099", "100", "101", "102", "103", "104", "105", "106", "107", "108", "109", "110", "111", "112", "113", "114", "115", "116", "117", "118", "119", "120", "121", "122", "123", "124", "125", "126", "127", "128", "129", "130", "131", "132", "133", "134", "135", "136", "137", "138", "139", "140", "141", "142", "143", "144", "145", "146", "147", "148", "149", "150", "151", "152", "153", "154", "155", "156", "157", "158", "159", "160", "161", "162", "163", "164", "165", "166", "167", "168", "169", "170", "171", "172", "173", "174", "175", "176", "177", "178", "179", "180", "181", "182", "183", "184", "185", "186", "187", "188", "189", "190", "191", "192", "193", "194", "195", "196", "197", "198", "199", "200", "201", "202", "203", "204", "205", "206", "207", "208", "209", "210", "211", "212", "213", "214", "215", "216", "217", "218", "219", "220", "221", "222", "223", "224", "225", "226", "227", "228", "229", "230", "231", "232", "233", "234", "235", "236", "237", "238", "239", "240", "241", "242", "243", "244", "245", "246", "247", "248", "249", "250", "251", "252", "253", "254", "255", "256", "257", "258", "259", "260", "261", "262", "263", "264", "265", "266", "267", "268", "269", "270", "271", "272", "273", "274", "275", "276", "277", "278", "279", "280", "281", "282", "283", "284", "285", "286", "287", "288", "289", "290", "291", "292", "293", "294", "295", "296", "297", "298", "299", "300", "301", "302", "303", "304", "305", "306", "307", "308", "309", "310", "311", "312", "313", "314", "315", "316", "317", "318", "319", "320", "321", "322", "323", "324", "325", "326", "327", "328", "329", "330", "331", "332", "333", "334", "335", "336", "337", "338", "339", "340", "341", "342", "343", "344", "345", "346", "347", "348", "349", "350", "351", "352", "353", "354", "355", "356", "357", "358", "359", "360", "361", "362", "363", "364", "365", "366", "367", "368", "369", "370", "371", "372", "373", "374", "375", "376", "377", "378", "379", "380", "381", "382", "383", "384", "385", "386", "387", "388", "389", "390", "391", "392", "393", "394", "395", "396", "397", "398", "399", "400", "401", "402", "403", "404", "405", "406", "407", "408", "409", "410", "411", "412", "413", "414", "415", "416", "417", "418", "419", "420", "421", "422", "423", "424", "425", "426", "427", "428", "429", "430", "431", "432", "433", "434", "435", "436", "437", "438", "439", "440", "441", "442", "443", "444", "445", "446", "447", "448", "449", "450", "451", "452", "453", "454", "455", "456", "457", "458", "459", "460", "461", "462", "463", "464", "465", "466", "467", "468", "469", "470", "471", "472", "473", "474", "475", "476", "477", "478", "479", "480", "481", "482", "483", "484", "485", "486", "487", "488", "489", "490", "491", "492", "493", "494", "495", "496", "497", "498", "499", "500", "501", "502", "503", "504", "505", "506", "507", "508", "509", "510", "511", "512", "513", "514", "515", "516", "517", "518", "519", "520", "521", "522", "523", "524", "525", "526", "527", "528", "529", "530", "531", "532", "533", "534", "535", "536", "537", "538", "539", "540", "541", "542", "543", "544", "545", "546", "547", "548", "549", "550", "551", "552", "553", "554", "555", "556", "557", "558", "559", "560", "561", "562", "563", "564", "565", "566", "567", "568", "569", "570", "571", "572", "573", "574", "575", "576", "577", "578", "579", "580", "581", "582", "583", "584", "585", "586", "587", "588", "589", "590", "591", "592", "593", "594", "595", "596", "597", "598", "599", "600", "601", "602", "603", "604", "605", "606", "607", "608", "609", "610", "611", "612", "613", "614", "615", "616", "617", "618", "619", "620", "621", "622", "623", "624", "625", "626", "627", "628", "629", "630", "631", "632", "633", "634", "635", "636", "637", "638", "639", "640", "641", "642", "643", "644", "645", "646", "647", "648", "649", "650", "651", "652", "653", "654", "655", "656", "657", "658", "659", "660", "661", "662", "663", "664", "665", "666", "667", "668", "669", "670", "671", "672", "673", "674", "675", "676", "677", "678", "679", "680", "681", "682", "683", "684", "685", "686", "687", "688", "689", "690", "691", "692", "693", "694", "695", "696", "697", "698", "699", "700", "701", "702", "703", "704", "705", "706", "707", "708", "709", "710", "711", "712", "713", "714", "715", "716", "717", "718", "719", "720", "721", "722", "723", "724", "725", "726", "727", "728", "729", "730", "731", "732", "733", "734", "735", "736", "737", "738", "739", "740", "741", "742", "743", "744", "745", "746", "747", "748", "749", "750", "751", "752", "753", "754", "755", "756", "757", "758", "759", "760", "761", "762", "763", "764", "765", "766", "767", "768", "769", "770", "771", "772", "773", "774", "775", "776", "777", "778", "779", "780", "781", "782", "783", "784", "785", "786", "787", "788", "789", "790", "791", "792", "793", "794", "795", "796", "797", "798", "799", "800", "801", "802", "803", "804", "805", "806", "807", "808", "809", "810", "811", "812", "813", "814", "815", "816", "817", "818", "819", "820", "821", "822", "823", "824", "825", "826", "827", "828", "829", "830", "831", "832", "833", "834", "835", "836", "837", "838", "839", "840", "841", "842", "843", "844", "845", "846", "847", "848", "849", "850", "851", "852", "853", "854", "855", "856", "857", "858", "859", "860", "861", "862", "863", "864", "865", "866", "867", "868", "869", "870", "871", "872", "873", "874", "875", "876", "877", "878", "879", "880", "881", "882", "883", "884", "885", "886", "887", "888", "889", "890", "891", "892", "893", "894", "895", "896", "897", "898", "899", "900", "901", "902", "903", "904", "905", "906", "907", "908", "909", "910", "911", "912", "913", "914", "915", "916", "917", "918", "919", "920", "921", "922", "923", "924", "925", "926", "927", "928", "929", "930", "931", "932", "933", "934", "935", "936", "937", "938", "939", "940", "941", "942", "943", "944", "945", "946", "947", "948", "949", "950", "951", "952", "953", "954", "955", "956", "957", "958", "959", "960", "961", "962", "963", "964", "965", "966", "967", "968", "969", "970", "971", "972", "973", "974", "975", "976", "977", "978", "979", "980", "981", "982", "983", "984", "985", "986", "987", "988", "989", "990", "991", "992", "993", "994", "995", "996", "997", "998", "999");
                }
                break;
            case 29 :
                $returnArr = array("1");
                break;
            case 36 :
            case 37 :
            case 38 :
                $returnArr = array("4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14");
                break;
            case 42 :
                $returnArr = array("6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21");
                break;
            case 46 :
                $returnArr = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17");
                break;
            case 48 :
            case 49 :
            case 50 :
            case 51 :
            case 52 :
                $returnArr = array("0");
                break;
			case 74 :
				$returnArr = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14");
				break;
			case 75 :
				$returnArr = array("0", "1", "2", "3", "4", "5", "6", "7");
				break;
			case 76 :
				$returnArr = array("0", "1", "2", "3", "4");
				break;
            default :
                $returnArr = array();
                break;
        }
        return $returnArr;
    }

    public function checkBetNumber ($bettype, $num, $rcmpToR3p = false)
    {
        $chkArr = $this->getBetTypeNumber($bettype);
        $arrIdx = array_search($num, $chkArr);
        if ($arrIdx === false)
        {
            return false;
        }
        return $num === $chkArr[$arrIdx];
    }

    public function getRateFromRateArr_OLD ($bettype, $num, $rateArr)
    {
        $rateSub1 = array(56 => 1, 59 => 1, 4 => 1, 5 => 1, 6 => 1, 57 => 1, 60 => 1, 7 => 1, 8 => 1, 9 => 1, 58 => 1, 61 => 1, 10 => 1, 11 => 1, 12 => 1, 36 => 4, 37 => 4, 38 => 4, 62 => 1, 63 => 1, 64 => 1, 65 => 1, 66 => 1, 67 => 1, 68 => 1, 17 => 1, 18 => 1, 19 => 1, 42 => 6, 22 => 1, 23 => 1, 44 => 1, 45 => 1, 29 => 1, 71 => 1, 72 => 1, 73 => 1);
        $rateSub2 = array(13 => 13, 20 => 20);
        if (!is_array($num))
        {
            $num = intval($num);
        }
        if (isset($rateSub1[$bettype]))
        {
            $rateIdx = $num - $rateSub1[$bettype];
            return $rateArr[$rateIdx];
        }
        $chkArr = $this->getBetTypeNumber($bettype);
        $rateIdx = array_search($num, $chkArr);
        return 0;
        if ($bettype == 46)
        {
            $reRate = 1;
            $num = array($num);
            foreach ($num as $val)
            {
                $val = intval($val);
                if (isset($rateArr[$val]))
                {
                    $reRate *= $rateArr[$val];
                }
                else
                {
                    $reRate *= "0";
                }
            }
            $reRate = intval($reRate * 100) / 100;
            return $reRate;
        }
        if (isset($rateArr[$num]))
        {
            return $rateArr[$num];
        }
        return 0;
    }

    public function getRateFromRateArr ($bettype, $num, $rateArr, $getRatesNumArr = array(), $getRatesSNumArr = array())
    {
        $rateSub1 = array(56 => 1, 59 => 1, 4 => 1, 5 => 1, 6 => 1, 57 => 1, 60 => 1, 7 => 1, 8 => 1, 9 => 1, 58 => 1, 61 => 1, 10 => 1, 11 => 1, 12 => 1, 36 => 4, 37 => 4, 38 => 4, 62 => 1, 63 => 1, 64 => 1, 65 => 1, 66 => 1, 67 => 1, 68 => 1, 17 => 1, 18 => 1, 19 => 1, 42 => 6, 22 => 1, 23 => 1, 44 => 1, 45 => 1, 29 => 1, 71 => 1, 72 => 1, 73 => 1);
        $rateSub2 = array(13 => 13, 20 => 20);
        $ratenumArr = array(13, 14, 15, 16, 20, 21, 35);
        if (in_array($bettype, $ratenumArr))
        {
            $numLen = strlen($num);
            $numInt = intval($num);
            $r1 = isset($getRatesNumArr[$numInt]) ? $getRatesNumArr[$numInt] : 0;
            $r2 = isset($getRatesSNumArr[$numInt]) ? $getRatesSNumArr[$numInt] : 0;
            if ($numLen == 2)
            {
                if (substr($num, 0, 1) == substr($num, 1, 1))
                {
                    return floatval($rateArr['r02'] - $r1 - $r2);
                }
                return floatval($rateArr['r01'] - $r1 - $r2);
            }
            if ($numLen == 3)
            {
                if (substr($num, 0, 1) == substr($num, 1, 1) && substr($num, 0, 1) == substr($num, 2, 1))
                {
                    return floatval($rateArr['r03'] - $r1 - $r2);
                }
                if (substr($num, 0, 1) == substr($num, 1, 1) || substr($num, 0, 1) == substr($num, 2, 1) || substr($num, 1, 1) == substr($num, 2, 1))
                {
                    return floatval($rateArr['r02'] - $r1 - $r2);
                }
                return floatval($rateArr['r01'] - $r1 - $r2);
            }
            return 0;
        }
        if (!is_array($num))
        {
            $num = intval($num);
            $numIdx = "r" . str_pad($num, 2, "0", STR_PAD_LEFT);
        }
        if (isset($rateSub1[$bettype]))
        {
            $rateIdx = "r" . str_pad($num, 2, "0", STR_PAD_LEFT);
            return floatval($rateArr[$rateIdx]);
        }
        if (isset($rateSub2[$bettype]))
        {
            $rateIdx = "r" . str_pad($num, 2, "0", STR_PAD_LEFT);
            return isset($rateArr[$rateIdx]) ? floatval($rateArr[$rateIdx]) : 0;
        }
        if ($bettype == 46)
        {
            $reRate = 1;
            $num = is_array($num) ? $num : array(
                $num
                    );
            foreach ($num as $val)
            {
                $val = intval($val);
                $rateIdx = "r" . str_pad($val, 2, "0", STR_PAD_LEFT);
                if (isset($rateArr[$rateIdx]))
                {
                    $reRate *= $rateArr[$rateIdx];
                }
                else
                {
                    $reRate *= "0";
                }
            }
            $reRate = intval($reRate * 100) / 100;
            return floatval($reRate);
        }
        return floatval($rateArr[$numIdx]);
    }

    public function setRateFromRateArr ($bettype, $num, $rateArr, $rate)
    {
        $chkArr = $this->getBetTypeNumber($bettype);
        $arrIdx = array_search($num, $chkArr);
        if ($arrIdx === false)
        {
            return false;
        }
        $rateArr[$arrIdx] = $rate;
        return $rateArr;
    }

    public function setRateArr ($bettype, $numArr, $rateArr, $addVal, $mpType = "m")
    {
        $chkArr = $this->getBetTypeNumber($bettype);
        $reNumArr = array();
        switch ($mpType)
        {
            case "p" :
                foreach ($numArr as $val)
                {
                    $arrIdx = array_search($val, $chkArr);
                    if ($arrIdx !== false)
                    {
                        $tempIdx = "r" . str_pad($val, 2, "0", STR_PAD_LEFT);
                        $reNumArr[$tempIdx] = 0;
                    }
                }
                break;
            default :
                foreach ($numArr as $val)
                {
                    $arrIdx = array_search($val, $chkArr);
                    if ($arrIdx !== false)
                    {
                        $tempIdx = "r" . str_pad($val, 2, "0", STR_PAD_LEFT);
                        $reNumArr[$tempIdx] = $addVal;
                    }
                }
                break;
        }
        return $reNumArr;
    }

    public function setRateArrDir ($addVal, $numArr)
    {
        $msgArr1 = array();
        $msgArr2 = array();
        $ratePec = 1;
        $reArr = array();
        foreach ($numArr as $val)
        {
            if (21 < $val)
            {
                continue;
            }
            $numIdx = "r" . str_pad(intval($val), 2, "0", STR_PAD_LEFT);
            $reArr[$numIdx] = $addVal;
        }
        $returnArr = array(0 => $reArr, 1 => $msgArr1, 2 => $msgArr2, 3 => $ratePec);
        return $returnArr;
        foreach ($numArr as $val)
        {
            $val = intval($val);
            $arrIdx = "r" . str_pad($val, 2, "0", STR_PAD_LEFT);
            if (isset($rateArr[$arrIdx]))
            {
                switch ($UpdateType)
                {
                    case 0 :
                        $rateArr[$arrIdx] = $addVal;
                        break;
                    case 3 :
                        if ($typeflag != 1)
                        {
                            $rateArr += $arrIdx;
                        }
                        break;
                    case 1 :
                        if ($typeflag != 1)
                        {
                            $oldRate = $rateArr[$arrIdx];
                            $rateArr[$arrIdx] = $rateArr[$arrIdx] + $addVal;
                            $chkBetArr = array(24, 31);
                            if (in_array($bettype, $chkBetArr))
                            {
                                $ratePec = $oldRate ? round($rateArr[$arrIdx] / $oldRate, 4) : 0;
                            }
                        }
                        break;
                    case 4 :
                        if ($typeflag != 1)
                        {
                            $chkBetArr = array(24, 30, 25, 26, 27, 28, 31, 32, 33, 34);
                            if (in_array($bettype, $chkBetArr))
                            {
                                $rateArr *= $arrIdx;
                            }
                        }
                        break;
                }
                switch ($typeflag)
                {
                    case "1" :
                        $rateArr[$arrIdx] = $rateArr[$arrIdx] - 0 + $addVal;
                        $up30Limit = floatval($baseRateArr[$arrIdx]);
                        $down50Limit = round($baseRateArr[$arrIdx] * 50 / 100, 2);
                        $rateArr[$arrIdx] = min($up30Limit, $rateArr[$arrIdx]);
                        $rateArr[$arrIdx] = max($down50Limit, $rateArr[$arrIdx]);
                        break;
                    default :
                        $up30Limit = floatval($baseRateArr[$arrIdx]);
                        $down50Limit = round($baseRateArr[$arrIdx] * 50 / 100, 2);
                        $rateArr[$arrIdx] = min($up30Limit, $rateArr[$arrIdx]);
                        $rateArr[$arrIdx] = max($down50Limit, $rateArr[$arrIdx]);
                        break;
                }
            }
        }
        $returnArr = array(0 => $rateArr, 1 => $msgArr1, 2 => $msgArr2, 3 => $ratePec);
        return $returnArr;
    }

    public function getBaseBet ($bettype, $disk)
    {
        $returnArr = "";
        switch ($bettype)
        {
            case 0 :
                $reValArr = array("a" => "00003.2800003.2800003.2800003.2800003.2800003.2800003.2800003.2800003.2800003.28", "b" => "00003.0700003.0700003.0700003.0700003.0700003.0700003.0700003.0700003.0700003.07", "c" => "00003.0000003.0000003.0000003.0000003.0000003.0000003.0000003.0000003.0000003.00", "d" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000003.00");
                break;
            case 1 :
            case 69 :
            case 70 :
            case 2 :
                $reValArr = array("a" => "00008.5600008.5600008.5600008.5600008.5600008.5600008.5600008.5600008.5600008.56", "b" => "00008.0600008.0600008.0600008.0600008.0600008.0600008.0600008.0600008.0600008.06", "c" => "00007.7900007.7900007.7900007.7900007.7900007.7900007.7900007.7900007.7900007.79", "d" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000003.00");
                break;
            case 3 :
                $reValArr = array("a" => "00008.5600008.5600008.5600008.5600008.5600008.5600008.5600008.5600008.5600008.56", "b" => "00008.0600008.0600008.0600008.0600008.0600008.0600008.0600008.0600008.0600008.06", "c" => "00007.7900007.7900007.7900007.7900007.7900007.7900007.7900007.7900007.7900007.79", "d" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000003.00");
                break;
            case 4 :
            case 56 :
            case 57 :
            case 58 :
            case 59 :
            case 60 :
            case 61 :
                $reValArr = array("a" => "00001.9100001.91", "b" => "00001.8900001.89", "c" => "00001.8700001.87", "d" => "00000.0000000.00");
                break;
            case 5 :
                $reValArr = array("a" => "00001.9100001.91", "b" => "00001.8900001.89", "c" => "00001.8700001.87", "d" => "00000.0000000.00");
                break;
            case 6 :
                $reValArr = array("a" => "00001.9100001.91", "b" => "00001.8900001.89", "c" => "00001.8700001.87", "d" => "00000.0000000.00");
                break;
            case 7 :
                $reValArr = array("a" => "00001.9100001.91", "b" => "00001.8900001.89", "c" => "00001.8700001.87", "d" => "00000.0000000.00");
                break;
            case 8 :
                $reValArr = array("a" => "00001.9100001.91", "b" => "00001.8900001.89", "c" => "00001.8700001.87", "d" => "00000.0000000.00");
                break;
            case 9 :
                $reValArr = array("a" => "00001.9100001.91", "b" => "00001.8900001.89", "c" => "00001.8700001.87", "d" => "00000.0000000.00");
                break;
            case 10 :
                $reValArr = array("a" => "00001.9100001.91", "b" => "00001.8900001.89", "c" => "00001.8700001.87", "d" => "00000.0000000.00");
                break;
            case 11 :
                $reValArr = array("a" => "00001.9100001.91", "b" => "00001.8900001.89", "c" => "00001.8700001.87", "d" => "00000.0000000.00");
                break;
            case 12 :
                $reValArr = array("a" => "00001.9100001.91", "b" => "00001.8900001.89", "c" => "00001.8700001.87", "d" => "00000.0000000.00");
                break;
            case 13 :
                $reValArr = array("a" => "00030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.5000030.50", "b" => "00028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.8000028.80", "c" => "00027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.6000027.60", "d" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00");
                break;
            case 14 :
                $reValArr = array("a" => "00084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.00", "b" => "00079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.00", "c" => "00076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.50", "d" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00");
                break;
            case 15 :
                $reValArr = array("a" => "00084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.00", "b" => "00079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.00", "c" => "00076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.50", "d" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00");
                break;
            case 16 :
                $reValArr = array("a" => "00084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.0000084.00", "b" => "00079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.0000079.00", "c" => "00076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.5000076.50", "d" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00");
                break;
            case 17 :
            case 62 :
            case 63 :
            case 64 :
            case 65 :
            case 66 :
            case 67 :
            case 68 :
                $reValArr = array("a" => "00001.9100001.91", "b" => "00001.8900001.89", "c" => "00001.8700001.87", "d" => "00000.0000000.00");
                break;
            case 73 :
                $reValArr = array("a" => "00000.0000000.0000000.00", "b" => "00000.0000000.0000000.00", "c" => "00000.0000000.0000000.00", "d" => "00000.0000000.0000000.00");
                break;
            case 18 :
                $reValArr = array("a" => "00001.9100001.91", "b" => "00001.8900001.89", "c" => "00001.8700001.87", "d" => "00000.0000000.00");
                break;
            case 19 :
                $reValArr = array("a" => "00001.9100001.91", "b" => "00001.8900001.89", "c" => "00001.8700001.87", "d" => "00000.0000000.00");
                break;
            case 20 :
                $reValArr = array("a" => "00740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.00", "b" => "00690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.00", "c" => "00700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.00", "d" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00");
                break;
            case 21 :
            case 35 :
                $reValArr = array("a" => "00740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.0000740.00", "b" => "00690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.0000690.00", "c" => "00700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.0000700.00", "d" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00");
                break;
            case 22 :
                $reValArr = array("a" => "00001.9100001.91", "b" => "00001.8900001.89", "c" => "00001.8700001.87", "d" => "00000.0000000.00");
                break;
            case 23 :
                $reValArr = array("a" => "00001.9100001.91", "b" => "00001.8900001.89", "c" => "00001.8700001.87", "d" => "00000.0000000.00");
                break;
            case 24 :
            case 25 :
            case 26 :
            case 27 :
            case 28 :
                $reValArr = array("a" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "b" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "c" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "d" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00");
                break;
            case 29 :
                $reValArr = array("a" => "00000.00", "b" => "00000.00", "c" => "00000.00", "d" => "00000.00");
                break;
            case 30 :
            case 31 :
            case 32 :
            case 33 :
            case 34 :
                $reValArr = array("a" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "b" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "c" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "d" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00");
                break;
            case 36 :
            case 37 :
            case 38 :
                $reValArr = array("a" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "b" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "c" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "d" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00");
                break;
            case 39 :
            case 40 :
            case 41 :
            case 43 :
            case 47 :
            case 53 :
            case 54 :
                $reValArr = array("a" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "b" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "c" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "d" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00");
                break;
            case 42 :
                $reValArr = array("a" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "b" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "c" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "d" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00");
                break;
            case 44 :
            case 45 :
            case 71 :
            case 72 :
                $reValArr = array("a" => "00000.0000000.00", "b" => "00000.0000000.00", "c" => "00000.0000000.00", "d" => "00000.0000000.00");
                break;
            case 46 :
                $reValArr = array("a" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "b" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "c" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00", "d" => "00000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.0000000.00");
                break;
            case 48 :
            case 49 :
            case 50 :
            case 51 :
            case 52 :
                $reValArr = array("a" => "00000.00", "b" => "00000.00", "c" => "00000.00", "d" => "00000.00");
                break;
            case 55 :
                $defaultValArr = array("a" => "00001.96", "b" => "00001.96", "c" => "00001.96", "d" => "00001.96");
                $reValArr = array();
                $reValArr[$disk] = "";
                $i = 0;
                while ($i < 10)
                {
                    $reValArr .= $disk;
                    ++$i;
                }
                break;
        }
        return $reValArr[$disk];
    }

    public function mystr_split ($str, $len = 8)
    {
        $reArray = array();
        if (0 < strlen($str))
        {
            $n = strlen($str) / $len;
            if (0 < strlen($str) % $len)
            {
                $n = $n + 1;
            }
            $i = 0;
            while ($i < $n)
            {
                $reArray[] = floatval(substr($str, $len * $i, $len));
                ++$i;
            }
        }
        return $reArray;
    }

    public function formatrate ($str)
    {
        $formatted = sprintf("%08.2f", $str);
        return substr($formatted, 0 - 8);
    }

    public function getRateAddVal ($bettype)
    {
        $returnArr = "";
        switch ($bettype)
        {
            case 0 :
                $reValArr = array("b" => "rate11a_b_{$this->tbl}", "c" => "rate11a_c_{$this->tbl}", "d" => "rate11a_d_{$this->tbl}");
                break;
            case 1 :
            case 2 :
            case 3 :
                $reValArr = array("b" => "rate12a_b_{$this->tbl}", "c" => "rate12a_c_{$this->tbl}", "d" => "rate12a_d_{$this->tbl}");
                break;
            case 4 :
            case 5 :
            case 6 :
            case 7 :
            case 8 :
            case 9 :
            case 10 :
            case 11 :
            case 12 :
                $reValArr = array("b" => "rate13a_b_{$this->tbl}", "c" => "rate13a_c_{$this->tbl}", "d" => "rate13a_d_{$this->tbl}");
                break;
            case 13 :
                $reValArr = array("b" => "rate21a_b_{$this->tbl}", "c" => "rate21a_c_{$this->tbl}", "d" => "rate21a_d_{$this->tbl}");
                break;
            case 14 :
            case 15 :
            case 16 :
                $reValArr = array("b" => "rate22a_b_{$this->tbl}", "c" => "rate22a_c_{$this->tbl}", "d" => "rate22a_d_{$this->tbl}");
                break;
            case 17 :
            case 18 :
            case 19 :
                $reValArr = array("b" => "rate23a_b_{$this->tbl}", "c" => "rate23a_c_{$this->tbl}", "d" => "rate23a_d_{$this->tbl}");
                break;
            case 20 :
                $reValArr = array("b" => "rate31a_b_{$this->tbl}", "c" => "rate31a_c_{$this->tbl}", "d" => "rate31a_d_{$this->tbl}");
                break;
            case 21 :
                $reValArr = array("b" => "rate32a_b_{$this->tbl}", "c" => "rate32a_c_{$this->tbl}", "d" => "rate32a_d_{$this->tbl}");
                break;
            case 22 :
            case 23 :
                $reValArr = array("b" => "rate33a_b_{$this->tbl}", "c" => "rate33a_c_{$this->tbl}", "d" => "rate33a_d_{$this->tbl}");
                break;
            case 24 :
            case 25 :
            case 26 :
            case 27 :
            case 28 :
                $reValArr = array("b" => "rateg3a_b_{$this->tbl}", "c" => "rateg3a_c_{$this->tbl}", "d" => "rateg3a_d_{$this->tbl}");
                break;
            case 29 :
                $reValArr = array("b" => "rateg32a_b_{$this->tbl}", "c" => "rateg32a_c_{$this->tbl}", "d" => "rateg32a_d_{$this->tbl}");
                break;
            case 30 :
            case 31 :
            case 32 :
            case 33 :
            case 34 :
                $reValArr = array("b" => "rateg6a_b_{$this->tbl}", "c" => "rateg6a_c_{$this->tbl}", "d" => "rateg6a_d_{$this->tbl}");
                break;
            case 35 :
                $reValArr = array("b" => "ratecmpa_b_{$this->tbl}", "c" => "ratecmpa_c_{$this->tbl}", "d" => "ratecmpa_d_{$this->tbl}");
                break;
            default :
                $reValArr = array("b" => "", "c" => "", "d" => "");
                break;
        }
        return $reValArr;
    }

    public function getBetContent ($bettype, $num, $srateFlag = false)
    {
        $reVal = "";
        switch ($bettype)
        {
            case 21 :
                if ($srateFlag)
                {
                    $tempArr = array("1" => "一般号码", "2" => "对对号码", "3" => "&#35961;子号码");
                    $reVal = $tempArr[$num];
                }
                else
                {
                    $num = str_pad($num, 3, "0", STR_PAD_LEFT);
                    $reVal = $num;
                }
                break;
            case 0 :
            case 1 :
            case 2 :
            case 3 :
            case 47 :
            case 53 :
            case 54 :
            case 55 :
            case 69 :
            case 70 :
                $reVal = $num;
                break;
            case 39 :
            case 40 :
            case 41 :
            case 43 :
                $reVal = $num . " 尾";
                break;
            case 4 :
            case 5 :
            case 6 :
            case 22 :
            case 56 :
            case 59 :
                $tempArr = array("1" => "大", "2" => "小");
                $reVal = $tempArr[$num];
                break;
            case 44 :
                $tempArr = array("1" => "尾大", "2" => "尾小");
                $reVal = $tempArr[$num];
                break;
            case 7 :
            case 8 :
            case 9 :
            case 17 :
            case 18 :
            case 19 :
            case 23 :
            case 60 :
            case 57 :
            case 62 :
            case 63 :
            case 64 :
            case 65 :
            case 66 :
            case 67 :
            case 68 :
                $tempArr = array("1" => "单", "2" => "双");
                $reVal = $tempArr[$num];
                break;
            case 10 :
            case 11 :
            case 12 :
            case 58 :
            case 61 :
                $tempArr = array("1" => "质", "2" => "合");
                $reVal = $tempArr[$num];
                break;
            case 45 :
                $tempArr = array("1" => "尾质", "2" => "尾合");
                $reVal = $tempArr[$num];
                break;
            case 14 :
                if ($srateFlag)
                {
                    $tempArr = array("1" => "一般号码", "2" => "对对号码");
                    $reVal = $tempArr[$num];
                }
                else
                {
                    $num = str_pad($num, 2, "0", STR_PAD_LEFT);
                    $reVal = $num . "X";
                }
                break;
            case 15 :
                if ($srateFlag)
                {
                    $tempArr = array("1" => "一般号码", "2" => "对对号码");
                    $reVal = $tempArr[$num];
                }
                else
                {
                    $num = str_pad($num, 2, "0", STR_PAD_LEFT);
                    $reVal = substr($num, 0, 1) . "X" . substr($num, 1, 1);
                }
                break;
            case 16 :
                if ($srateFlag)
                {
                    $tempArr = array("1" => "一般号码", "2" => "对对号码");
                    $reVal = $tempArr[$num];
                }
                else
                {
                    $num = str_pad($num, 2, "0", STR_PAD_LEFT);
                    $reVal = "X" . $num;
                }
                break;
            case 29 :
                $reVal = "全包";
                break;
            case 13 :
                if ($srateFlag)
                {
                    $tempArr = array("1" => "一般号码", "2" => "对对号码");
                    $reVal = $tempArr[$num];
                }
                else
                {
                    $num = str_pad($num, 2, "0", STR_PAD_LEFT);
                    $reVal = $num;
                }
                break;
            case 20 :
                if ($srateFlag)
                {
                    $tempArr = array("1" => "一般号码", "2" => "对对号码", "3" => "&#35961;子号码");
                    $reVal = $tempArr[$num];
                }
                else
                {
                    $num = str_pad($num, 3, "0", STR_PAD_LEFT);
                    $reVal = $num;
                }
                break;
            case 24 :
            case 25 :
            case 26 :
            case 27 :
            case 28 :
            case 30 :
            case 31 :
            case 32 :
            case 33 :
            case 34 :
                $tempArr = $this->mystr_split($num, 1);
                $reVal = implode(",", $tempArr);
                break;
            case 35 :
                if ($srateFlag)
                {
                    $tempArr = array("1" => "一般号码", "2" => "对对号码", "3" => "&#35961;子号码");
                    $reVal = $tempArr[$num];
                }
                else
                {
                    $reValArr = explode(",", $num);
                    $reVal = implode(" x ", $reValArr);
                }
                break;
            case 36 :
            case 37 :
            case 38 :
                if ($num == "4")
                {
                    $reVal = "0~4";
                }
                else if ($num == "14")
                {
                    $reVal = "14~18";
                }
                else
                {
                    $reVal = $num;
                }
                break;
            case 42 :
                if ($num == "6")
                {
                    $reVal = "0~6";
                }
                else if ($num == "21")
                {
                    $reVal = "21~27";
                }
                else
                {
                    $reVal = $num;
                }
                break;
            case 46 :
                $reVal = "";
                if (is_array($num))
                {
                    $tempNumArr = $num;
                }
                else
                {
                    $numIdx = ( $num - $num % 6 ) / 5;
                    $tempNumArr = array($numIdx => $num);
                }
                $tempArr = array("0" => "大", "1" => "小", "2" => "单", "3" => "双", "4" => "质", "5" => "合");
                $tempArr2 = array("0" => "佰", "1" => "拾", "2" => "个");
                foreach ($tempNumArr as $key => $num)
                {
                    $tempNum = $num % 6;
                    $reVal .= " X " . $tempArr2[$key] . $tempArr[$tempNum];
                }
                $reVal = substr($reVal, 3);
                break;
            case 48 :
                $reVal = "豹子";
                break;
            case 49 :
                $reVal = "顺子";
                break;
            case 50 :
                $reVal = "对子";
                break;
            case 51 :
                $reVal = "半顺";
                break;
            case 52 :
                $reVal = "杂六";
                break;
            case 71 :
                $tempArr = array("1" => "总单", "2" => "总双");
                $reVal = $tempArr[$num];
                break;
            case 72 :
                $tempArr = array("1" => "总大", "2" => "总小");
                $reVal = $tempArr[$num];
                break;
            case 73 :
                $tempArr = array("1" => "龙", "2" => "虎", "3" => "和");
                $reVal = $tempArr[$num];
                break;
			case 74:
				$tempArr = array("牛1","牛2","牛3","牛4","牛5","牛6","牛7","牛8","牛9","牛牛","牛大","牛小","无牛","牛单","牛双");
				$reVal = $tempArr[$num];
				break;
			case 75:
				$tempArr = array("五条","四条","葫芦","顺子","三条","两对","单对","散号");
				$reVal = $tempArr[$num];
				break;
			case 76:
				$tempArr = array("豹子","顺子","对子","半顺","杂六");
				$reVal = $tempArr[$num];
				break;
        }
        return $reVal;
    }

    public function getPaperOpen ()
    {
        global $conf;
        $nextDateFlag = false;
        $startbet_3s = $conf->get("startbet_{$this->tbl}");
        $stopbet_3s = $conf->get("stopbet_{$this->tbl}");
        if ($stopbet_3s < $startbet_3s)
        {
            $nextDateFlag = true;
        }
        $now = date("Hi");
        $todayTime = systime();
        if ($nextDateFlag && $now < $stopbet_3s)
        {
            $today = date("Y-m-d", strtotime("-1 day"));
        }
        else
        {
            $today = date("Y-m-d");
        }
        return $today;
    }

    public function my_array_fill_keys ($keys, $value)
    {
        return array_combine($keys, array_fill(0, count($keys), $value));
    }

}

?>